package cn.myframe.config;

import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.Topic;

/*******************
 *@Describe
 *@author 封神梦
 *@Time 2022/12/9
 *@Company http://com.yiview.com
 ****************/

@Configuration
public class ConfigBeanTopic {
    //注入主题属性
    @Value("${topic-boot-name}")
    private String topicName;
    @Bean
    public Topic createTopic(){
        return new ActiveMQTopic(topicName);
    }
}
